<div class="container">
    <div class="row">
        <div class="col-md-12">
            <br>
            <div class="panel-body">
                <form class="form-horizontal" method="post" action="/consumer/save" onsubmit="return false">
                    <input type="hidden" name="node_id" value="{{.node_id}}">
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>消费URL</label>
                        <div class="col-sm-6">
                            <input type="text" name="url" class="form-control" placeholder="消费接口" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>选择消息</label>
                        <div class="col-sm-6">
                            <select name="message" class="form-control">
                                {{range $message := .messages}}
                                <option value="{{$message.Name}}">{{$message.Name}}</option>
                                {{end}}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"></span>RouteKey</label>
                        <div class="col-sm-6">
                            <input type="text" name="route_key" class="form-control" placeholder="RouteKey" value="" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>超时时间</label>
                        <div class="col-sm-6">
                            <input type="text" name="timeout" class="form-control" placeholder="超时时间(毫秒)" value="" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>检查httpCode</label>
                        <div class="col-sm-4">
                            <label class="radio-inline">
                                <input type="radio" name="check_code" value="1" checked="checked">
                                是
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="check_code" value="0">
                                否
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"></span>httpCode</label>
                        <div class="col-sm-6">
                            <input type="text" name="code" class="form-control" placeholder="如果需要检查httpCode, 请输入code码，默认是200，否，不输入" value="" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-6">
                            <input type="text" name="comment" class="form-control" placeholder="备注" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="button" name="submit" onclick="Form.ajaxSubmit(this.form, true)" class="btn btn-success">保存</button>
                        </div>
                    </div>
                </form>
            </div>
            <hr>
        </div>
    </div>
</div>